<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns an appropriately localized display name for language of the inputlocale</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="locale.getdefault.html">Locale::getDefault</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="locale.getdisplayname.html">Locale::getDisplayName</a></div>
 <div class="up"><a href="class.locale.html">Locale</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="locale.getdisplaylanguage" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Locale::getDisplayLanguage</h1>
  <h1 class="refname">locale_get_display_language</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PECL intl &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">Locale::getDisplayLanguage</span> -- <span class="refname">locale_get_display_language</span> &mdash; <span class="dc-title">Returns an appropriately localized display name for language of the inputlocale</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-locale.getdisplaylanguage-description">
  <h3 class="title">说明</h3>
  <p class="para">
   面向对象风格
  </p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="modifier">static</span>
   <span class="type">string</span> 
   <span class="methodname"><strong>Locale::getDisplayLanguage</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$locale</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$in_locale</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   过程化风格
  </p>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> 
   <span class="methodname"><strong>locale_get_display_language</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$locale</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$in_locale</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   Returns an appropriately localized display name for language of the input
   locale. If is <strong><code>NULL</code></strong> then the default locale is used.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-locale.getdisplaylanguage-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">locale</code></em></dt>

     <dd>

      <p class="para">
       The locale to return a display language for
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">in_locale</code></em></dt>

     <dd>

      <p class="para">
       Optional format locale to use to display the language name
      </p>
     </dd>

    
   </dl>

  </p>
 </div>



 <div class="refsect1 returnvalues" id="refsect1-locale.getdisplaylanguage-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   display name of the language for the $locale in the format appropriate for
   $in_locale.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-locale.getdisplaylanguage-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-2478">
   <p><strong>Example #1 <span class="function"><strong>locale_get_display_language()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">locale_get_display_language</span><span style="color: #007700">(</span><span style="color: #DD0000">'sl-Latn-IT-nedis'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'en'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">";\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">locale_get_display_language</span><span style="color: #007700">(</span><span style="color: #DD0000">'sl-Latn-IT-nedis'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'fr'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">";\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">locale_get_display_language</span><span style="color: #007700">(</span><span style="color: #DD0000">'sl-Latn-IT-nedis'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'de'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
  <div class="example" id="example-2479">
   <p><strong>Example #2 OO example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">Locale</span><span style="color: #007700">::</span><span style="color: #0000BB">getDisplayLanguage</span><span style="color: #007700">(</span><span style="color: #DD0000">'sl-Latn-IT-nedis'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'en'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">";\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">Locale</span><span style="color: #007700">::</span><span style="color: #0000BB">getDisplayLanguage</span><span style="color: #007700">(</span><span style="color: #DD0000">'sl-Latn-IT-nedis'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'fr'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">";\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">Locale</span><span style="color: #007700">::</span><span style="color: #0000BB">getDisplayLanguage</span><span style="color: #007700">(</span><span style="color: #DD0000">'sl-Latn-IT-nedis'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'de'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
  <p class="para">以上例程会输出：</p>
  <div class="example-contents screen">
<div class="cdata"><pre>
Slovenian;
slov\xc3\xa8ne;
Slowenisch
</pre></div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-locale.getdisplaylanguage-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="locale.getdisplayname.html" class="function" rel="rdfs-seeAlso">locale_get_display_name()</a> - Returns an appropriately localized display name for the input locale</span></li>
    <li class="member"><span class="function"><a href="locale.getdisplayscript.html" class="function" rel="rdfs-seeAlso">locale_get_display_script()</a> - Returns an appropriately localized display name for script of the input locale</span></li>
    <li class="member"><span class="function"><a href="locale.getdisplayregion.html" class="function" rel="rdfs-seeAlso">locale_get_display_region()</a> - Returns an appropriately localized display name for region of the input locale</span></li>
    <li class="member"><span class="function"><a href="locale.getdisplayvariant.html" class="function" rel="rdfs-seeAlso">locale_get_display_variant()</a> - Returns an appropriately localized display name for variants of the input locale</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="locale.getdefault.html">Locale::getDefault</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="locale.getdisplayname.html">Locale::getDisplayName</a></div>
 <div class="up"><a href="class.locale.html">Locale</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
